﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace 多选按钮弹窗
{
    /// <summary>
    /// MainWindow.xaml 的交互逻辑
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        //点击该按钮的时候显示自定义的三选对话框
        private void btnShow_Click(object sender, RoutedEventArgs e)
        {
            MyDialog md = new MyDialog();
            md.ShowDialog();//显示窗口

            //判断点击的是哪个按钮
            if (md.Choose == true)
            {
                MessageBox.Show("您选择的OK！");
            }
            else if (md.Choose == null)
            {
                MessageBox.Show("您选择的重试！");
            }
            else
            {
                MessageBox.Show("您选择的取消！");
            }
        }
    }
}
